﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace S2_Xxxx_XxxNetApi
{
    interface ICacheHelper<T>
    {
        /// <summary>
        /// 更新缓存
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Edit(T model);

        /// <summary>
        /// 更新缓存
        /// </summary>
        /// <param name="listModel"></param>
        /// <returns></returns>
        public bool Edit(List<T> listModel);

        /// <summary>
        /// 新增缓存
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Insert(T model);

        /// <summary>
        /// 新增缓存
        /// </summary>
        /// <param name="listModel"></param>
        /// <returns></returns>
        public bool Insert(List<T> listModel);

        /// <summary>
        /// 删除缓存
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Delete(T model);

        /// <summary>
        /// 删除缓存
        /// </summary>
        /// <param name="listModel"></param>
        /// <returns></returns>
        public bool Delete(List<T> listModel);
    }
}
